#include <iostream>

// template<typename T>
// class TemplateSingleton
// {
// public:
//     static T* GetInstance()
//     {
//         static T instance;
//         return &instance;
//     }
// };

// //CRPT 奇异递归
// class Student:public TemplateSingleton<Student>
// {

// };

// class Person:public TemplateSingleton<Person>
// {

// };

template<typename T>
class Base
{
public:
    void show()
    {
        ((T*)this)->show();
    }
};

class Drived:public Base<Drived>
{
public:
    void show()
    {
        std::cout<<"Derived"<<std::endl;
    }
};

int main()
{   
    Base<Drived>*b = new Drived;
    b->show();
    return 0;
}